<template>
    <div>
        <HeaderTop title="Loan" :showBack="false"></HeaderTop>
        <div class="wrap">
            <div style="text-align:center">
                <img src="~@/assets/imgs/order/repayAll1.png" alt="">
            </div>
            <div v-if="showThreeDays === 1" class="line2">There are no products available for application today,please apply again after <strong>3 days.</strong></div>
            <div v-else class="line2">There are no products available for application today, please apply again tomorrow</div>
            <button @click="returnTo" class="back-btn">Check</button>
        </div>
      </div>
</template>
<script>
import HeaderTop from '@/components/header-top'
export default {
  components: {
    HeaderTop
  },
  data () {
    return {
        showThreeDays: 1
    }
  },
  methods:{
    returnTo(){
        // TODO 
        this.$router.replace({
          path: "/bill",
        });
    },
  },
  mounted () {
    // 判断是否首次产品列表为空
    // 有产品列表的时删除缓存
    const productShowText = this.$storage.get('productShowText')
      if (!productShowText) {
        this.showThreeDays = 1
        this.$storage.set('productShowText', 1)
      } else {
        this.showThreeDays = 2
      }
    }
  }
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>